123456/PO PHP H5/Yannick - Matteo/Resultaten.php
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style/style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<html><h1>Resulaten</h1></html>
<table border="1">
<tr>
<th>ResultaatID</th>
<th>RaceID</th>
<th>coureurID</th>
<th>positie</th>
<th>punten</th>
</tr>
<button onclick="location.href='Auto.php'">auto</button>
<button onclick="location.href='coureur.php'">coureur</button>
<button onclick="location.href='Races.php'">races</button>
<button onclick="location.href='index.php'">homepagina</button>
<?php
include('db2.php');
$query = "SELECT * FROM Resultaten";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_array($result)){
echo "<tr>";
echo "<td>{$row['ResultaatID']}</td>";
echo "<td><a href='Racedetails.php?RaceID=" . $row['raceID'] . "'>{$row['raceID']}</td>";
echo "<td><a href='coureurdetails.php?CoureurID=" . $row['coureurID'] . "'>{$row['coureurID']}</td>";
echo "<td>{$row['positie']}</td>";
echo "<td>{$row['punten']}</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse